//登录注册的电话和密码验证
const Service = require('egg').Service;
class HomeService extends Service {
  async checktel(tel) {
    const sql=`SELECT * FROM user WHERE tel="${tel}"`
    const data = await this.app.mysql.query(sql);
    return data;
  }
  async checkpasw(reqdata){
    const sql=`SELECT * FROM user WHERE tel="${reqdata.tel}"and pwd="${reqdata.pswd}"`
    const data = await this.app.mysql.query(sql);
    return data;
  }
}
module.exports = HomeService;